package com.ruoyi.message.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.core.annotation.Excel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户消息对象 message_single
 * 
 * @author ryb
 * @date 2021-01-27
 */
@Data
@ToString
@EqualsAndHashCode
@NoArgsConstructor
@Accessors(chain = true)
@TableName("message_single")
public class MessageSingle implements Serializable {

private static final long serialVersionUID=1L;

    /** $column.columnComment */
    @TableId(value = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 用户id */
    @Excel(name = "用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long memberId;

    /** nim云信,sys系统 */
    @Excel(name = "nim云信,sys系统")
    private String fromChannel;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 0 未读 1已读 */
    @Excel(name = "0 未读 1已读")
    private Integer isRead;

    /** 类型 图片/文本 */
    @Excel(name = "类型 图片/文本")
    private String type;

    /** 接受者id */
    @Excel(name = "接受者id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long toId;

    /** 来源客户端类型 */
    @Excel(name = "来源客户端类型")
    private String fromClientType;

    /** all/batch */
    @Excel(name = "all/batch")
    private String audience;

}
